#include <bits/stdc++.h>
using namespace std;

//a??????? T1 cheng ti????
//CCF ni shi ren zhen de?????
//zhe ti ni pa bu shi ba pu ji de ti mu fang dao ti gao le ba
//gan xie CCF de qian dao ti ,rang wo ti yan gan hen hao
//jiu shi fen shu xian cha bu duo yao dao 150 le....
//my name:__O_w_O__(luogu)
const int N = 100010;
int a[N];
int cnt[N];
int main() {
	freopen("duel.in", "r", stdin);
	freopen("duel.out", "w", stdout);
	int n;
	scanf("%d", &n);
	for (int i = 1; i <= n; i++) {
		scanf("%d", &a[i]);
		cnt[a[i]]++;
	}
	sort(a + 1, a + n + 1);
	int ans = n, now = 0;
	for (int i = 1; i <= n; i++) {
		if (now > 0) {
			ans--;
			now--;
		}
		if (a[i] < a[i + 1]) {
			now += cnt[a[i]];
		}	
	}
	cout << ans << endl;
	return 0;
}
